package com.ehome.poct.core.api.vo;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import java.io.Serializable;
import java.util.List;

@JsonInclude(Include.NON_NULL)
public class R<T> implements Serializable {
    private List<T> list;
    private Integer total;

    public R() {
    }

    public List<T> getList() {
        return this.list;
    }

    public static <T> R<T> set(List<T> list) {
        return (new R()).setList(list);
    }

    public static <T> R<T> set(List<T> list, Integer total) {
        return (new R()).setList(list).setTotal(total);
    }

    public R<T> setList(List<T> list) {
        this.list = list;
        return this;
    }

    public Integer getTotal() {
        return this.total;
    }

    public R<T> setTotal(Integer total) {
        this.total = total;
        return this;
    }
}